1 hint
="run before: remote/runit-configure nginx -- $site"
2 assert
"sudo test -f /etc/nginx/x509.d/\"$site\"/key.pem" hint
3 assert
"sudo test -f ~wiki-$site/etc/ssh/id_rsa" hint
5 sudo
install -m 664 -o www
-g www \
6 "$tool"/var
/pub
/x509
/vie.cyclocoop.org
/crt
+ca.pem \
7 /etc
/nginx
/x509.d
/"$site"/crt.pem
9 "$tool"/local
/apt-get-install ikiwiki \
11 libsearch-xapian-perl \
15 "$tool"/local
/adduser fcgi-
"$site" \
19 --home /home
/cyclo
/var
/ikiwiki
/'"'$site'"' \
22 "$tool"/local
/adduser www-
"$site" \
26 --home /home
/www
/data
/"$site" \
29 sudo adduser fcgi-
"$site" www-
"$site"
30 sudo adduser fcgi-
"$site" wiki-
"$site"
31 #sudo adduser www-"$site"-tls www-"$site"
32 sudo
install -d -m 2770 -o wiki-
"$site" -g wiki-
"$site" \
33 /home
/cyclo
/var
/ikiwiki
/"$site"
34 sudo
install -d -m 3771 -o git
-g git \
36 sudo
install -d -m 750 -o wiki-
"$site" -g git \
37 /home
/git
/hooks
/cyclo
/"$site"
38 sudo
install -m 771 -o git
-g git
/dev
/stdin \
39 /home
/git
/data
/cyclovie.git
/hooks
/post-update
<<-EOF
42 # The cd below is why we must use this script.
43 # The current directory may not be accessible
44 # by the user running the ikiwiki.
45 # the execution of the ikiwiki wrapper would fail with :
46 # "E: Failed to change to directory '...': Permission denied"
49 exec /home/git/hooks/cyclo/$site/post-update.ikiwiki
52 if sudo
test -d /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.git
53 then sudo
-u wiki-
"$site" sh
-$
-c ' \
54 cd /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
56 git submodule update --recursive --init'
58 sudo
-u wiki-
"$site" sh
-$
-c ' \
61 git@localhost:cyclovie \
62 /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
63 cd /home/cyclo/var/ikiwiki/'"'$site'"'/src &&
64 git config core.sharedRepository group &&
65 git submodule update --recursive --init
69 sudo adduser wiki-
"$site" www-
"$site"
70 sudo
install -d -m 2770 -o wiki-
"$site" -g fcgi-
"$site" \
71 /home
/www
/data
/"$site"/cgi
73 sudo
-u wiki-
"$site" ikiwiki \
75 --setup /home
/cyclo
/var
/ikiwiki
/"$site"/src
/ikiwiki.setup \
78 sudo chown fcgi-
"$site":wiki-
"$site" \
79 /home
/git
/hooks
/cyclo
/"$site"/post-update.ikiwiki
81 /home
/git
/hooks
/cyclo
/"$site"/post-update.ikiwiki
83 /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.ikiwiki \
84 /home
/cyclo
/var
/ikiwiki
/"$site"/src
/.ikiwiki
/xapian
/default
86 sudo
cat /etc
/gitweb
/gitweb.conf
- <<-EOF |
87 \$export_ok = "cyclo-vie-export-ok";
88 \$favicon = "/gitweb/static/git-favicon.png";
90 \$home_link_str = 'vie';
91 \$home_text = "/etc/gitweb/cyclo.home_text.html";
92 \$javascript = "/gitweb/static/gitweb.js";
93 \$logo = "/gitweb/static/git-logo.png";
94 \$my_uri = "/gitweb/";
95 \$my_url = "/gitweb/";
96 \$projects_list = "/etc/gitweb/cyclo-vie.projects.list";
97 \$site_footer = "/etc/gitweb/cyclo.site_footer.html";
98 \$site_header = "/etc/gitweb/cyclo.site_header.html";
99 \$site_name = "vie.cyclocoop.org";
100 @stylesheets = ("/gitweb/static/gitweb.css");#
102 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
103 /etc
/gitweb
/cyclo-vie.conf
104 sudo
install -m 640 -o root
-g fcgi-gitweb \
105 "$tool"/etc
/gitweb
/cyclo.home_text.html \
106 /etc
/gitweb
/cyclo.home_text.html
107 sudo
install -m 640 -o root
-g fcgi-gitweb
/dev
/stdin \
108 /etc
/gitweb
/cyclo-vie.projects.list
<<-EOF